import http from "../../utils/http";

export function getBlogTypeListApi(data) {
    return http({
        url: '/blog/getBlogTypeAll',
        method: 'get',
        data: data
    })
}

export function getBlogTextListApi(data) {
    return http({
        url: '/blog/getBlogTextList',
        method: 'post',
        data: data
    })
}

export function addBlogText(data) {
    return http({
        url: '/blog/addBlogText',
        method: 'post',
        data: data,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}

//修改博客内容
export function editBlogApi(data) {
    return http({
        url: '/blog/editBlogText',
        method: 'post',
        data: data,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}

// 图片上传
export function addBlogImg(data) {
    return http({
        url: '/blog/addBlogImg',
        method: 'post',
        data: data,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}

// 视频上传
export function addBlogVideo(data) {
    return http({
        url: '/blog/addBlogVideo',
        method: 'post',
        data: data,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}
